CC=gcc
CFLAGS=-o2 `pkg-config --cflags audacious libxml-2.0`
LDFLAGS= `pkg-config --libs libxml-2.0` -lpython2.6 /usr/lib/python2.6/config/libpython2.6.a
OUT=baidu
all:$(OUT)
	
main.o:main.c
	$(CC) $(CFLAGS) -o $@ -c $<
	
$(OUT):main.o
	$(CC) $(LDFLAGS) -o $@  $^

install: all
	mkdir -p /usr/share/ShowLyric
	cp BDDownLoadLyric.py /usr/share/ShowLyric/
	cp $(OUT) /usr/share/ShowLyric/
	
uninstall:
	rm /usr/share/ShowLyric/BDDownLoadLyric.py
	rm /usr/share/ShowLyric/$(OUT)
	rmdir /usr/share/ShowLyric/

clean:
	rm *.o
	rm $(OUT)
	
rebuild:
	make clean all

